﻿#pragma once
#include "afxdialogex.h"
#include <atomic>
#include <string>

// add by itas109 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
#define HKEY_LOCAL_MACHINE_SERIALCOMM       "Hardware\\DeviceMap\\SerialComm"
// end by itas109xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
// fct_test_l170qm_one 对话框

class fct_test_l170qm_one : public CDialogEx
{
	DECLARE_DYNAMIC(fct_test_l170qm_one)

public:
	fct_test_l170qm_one(CWnd* pParent = nullptr);   // 标准构造函数
	virtual ~fct_test_l170qm_one();

// 对话框数据
#ifdef AFX_DESIGN_TIME
	enum { IDD = IDD_MFC_L170QM_ONE };
#endif

protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV 支持
	virtual BOOL OnInitDialog();
	virtual BOOL PreTranslateMessage(MSG* pMsg);
	//实现串口热插拔 
	
	DECLARE_MESSAGE_MAP()


private:
	CString view;

	void recvTask(int portIndex, const char* data, int length);

public:

	void test_l170qm_Task();
	bool sendDataL170(int channel, char* data, int len);
	void viewlog(std::string log);
	void clearlog();
	CProgressCtrl m_ProgressCtrl;
};
